package com.ftn;

import java.awt.*;

/**
 * User: Jack Fu
 * Date: 2024/9/5
 * Time: 16:23
 * To change this template use File | Settings | File Templates.
 * Description:
 */
public class Enemy2BulletObj extends GameObj{
    public Enemy2BulletObj() {
    }

    public Enemy2BulletObj(int x, int y, int width, int height, Image image, int speed, GameWin gameWin) {
        super(x, y, width, height, image, speed, gameWin);
    }

    public Enemy2BulletObj(int x, int y, Image image, int speed) {
        super(x, y, image, speed);
    }

    @Override
    public void paintSelf(Graphics g) {
        super.paintSelf(g);
        y += getSpeed();

        if (this.getY() > 1000) {
            GameUtils.removeObjs.add(this);
        }
    }

    @Override
    public Rectangle getRec() {
        return super.getRec();
    }
}
